// MdiChildManagment.h: interface for the CMdiChildManagment class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MDICHILDMANAGMENT_H__126D32DB_9AFA_4A4A_9F27_AB35DAA0B564__INCLUDED_)
#define AFX_MDICHILDMANAGMENT_H__126D32DB_9AFA_4A4A_9F27_AB35DAA0B564__INCLUDED_

#include "SiWindow.h"

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CMdiChildManagment
{
public:
	CMdiChildManagment();
	virtual ~CMdiChildManagment();
	void SetTabbarWnd(HWND hTabWnd) { m_hTabbarWnd = hTabWnd; };

	CSiWindow* LookupMdiChild(HWND hWnd);
	BOOL RemoveAllMdiChildWnd();
	BOOL AddMdiChildWnd(HWND hWnd);
	BOOL RemoveMdiChildWnd(HWND hWnd);
	int GetChildCount();
	POSITION GetStartPosition();
	CSiWindow* GetNextAssoc(POSITION *pos);

	BOOL Lock() { return m_Look.Lock(); };
	BOOL Unlock()  { return m_Look.Unlock(); };
protected:
	HWND  m_hTabbarWnd;
	CMapPtrToPtr m_MapMdiChild;        // Main control map
	CSleepObject    m_Look;
};

extern CMdiChildManagment g_MdiChildMng;

#endif // !defined(AFX_MDICHILDMANAGMENT_H__126D32DB_9AFA_4A4A_9F27_AB35DAA0B564__INCLUDED_)
